
#ifndef _CONFIGURATION_H_
#define _CONFIGURATION_H_

#include <string>
#include <vector>

class Configuration {
public:
	static Configuration &instance();

	std::string daemonName() const;
	std::string lockfile() const;
	int workersNumber() const;
	std::string envpath() const;
	std::string phppath() const;
	std::string wwwroot() const;
	std::string indexFile() const;

	std::string listenAddress() const;
	int listenPort() const;
	std::vector<std::string> allowedexe() const;

private:
	Configuration();
	Configuration(const Configuration &);
	void operator=(const Configuration &);
	~Configuration();

	static Configuration *_instance;

	void readConfig(std::string path);

	std::string daemon_name;
	std::string _lockfile;
	int workers_number;
	std::string _envpath;
	std::string _phppath;
	std::string _wwwroot;
	std::string index_file;

	std::string listen_address;
	int listen_port;
	std::vector<std::string> allowed_exe;
};

#endif
